Currently, in various mobile phones, proximity optical sensors are widely applied to determine whether an object is approaching a mobile phone. A principle of the proximity optical sensor is that, an emitter emits an infrared ray, and receives an infrared ray reflected to a receiver end, and then determines, according to the intensity of the received infrared ray, whether there is an object approaching the mobile phone.
There is a proximity optical sensor formed of an infrared emitting diode and an infrared receiver in a mobile phone, where the infrared emitting diode emits an infrared ray. If there is an object reflecting back the emitted infrared ray, the reflected infrared ray is then received by the infrared receiver after being blocked by a physical structure such as a screen of the mobile phone. When the infrared emitting diode in the mobile phone works, the mobile phone receives an infrared ray in real time through the infrared receiver, and obtains an intensity value of a reflected infrared ray from the received infrared ray, and if the intensity value of the reflected infrared ray exceeds a preset threshold, it is determined that an object is approaching the mobile phone.
In a process of implementing the present invention, the inventor finds that the prior art has at least the following problem:
The infrared ray received by the infrared receiver is blocked by the physical structure such as the screen of the mobile phone; therefore, an impact generated because of the physical structure of the mobile phone exists in the obtained intensity value of the reflected infrared ray. However, an impact generated by each mobile phone is different, and if a same threshold is set for each mobile phone, some mobile phones will fail to accurately determine whether there is an object approaching.